package cn.tedu.egweibo5.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: Miyako
 * @CreateTime: 2024-08-14  20:48
 * @Description: TODO
 */
@Data
public class UserRegDTO {
    @Size(min = 6, max = 20 ,message = "用户名有效范围是6-20个字符")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,20}$", message = "密码必须包含大小写字母和数字，长度为6-20位")
    private String password;
    @Size(min = 2, max = 16 ,message = "昵称有效范围是2-16个字符")
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;
}
